// Copyright (c) Omar AL Zabir. All rights reserved.
// For continued development and updates, visit http://msmvps.com/omar

using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;

using Dropthings.DataAccess;

namespace Dropthings.Business.Activities
{
    public partial class DeleteWidgetZoneActivity : System.Workflow.ComponentModel.Activity
	{
		public DeleteWidgetZoneActivity()
		{
			InitializeComponent();
		}



        public int WidgetZoneId
        {
            get { return (int)GetValue(WidgetZoneIdProperty); }
            set { SetValue(WidgetZoneIdProperty, value); }
        }

        public static readonly DependencyProperty WidgetZoneIdProperty =
            DependencyProperty.Register("WidgetZoneId", typeof(int), typeof(DeleteWidgetZoneActivity));

        
        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            DatabaseHelper.DeleteByPK<WidgetZone, int>(DatabaseHelper.SubsystemEnum.WidgetZone, new int[] { this.WidgetZoneId });
            return ActivityExecutionStatus.Closed;
        }
	}
}
